<?php


/**
 * This class defines the structure of the 'daily_record' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    orm.map
 */
class DailyRecordTableMap extends TableMap {

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'orm.map.DailyRecordTableMap';

	/**
	 * Initialize the table attributes, columns and validators
	 * Relations are not initialized by this method since they are lazy loaded
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function initialize()
	{
	  // attributes
		$this->setName('daily_record');
		$this->setPhpName('DailyRecord');
		$this->setClassname('DailyRecord');
		$this->setPackage('orm');
		$this->setUseIdGenerator(true);
		// columns
		$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, 11, null);
		$this->addForeignKey('PLAYER_ID', 'PlayerId', 'INTEGER', 'player', 'ID', false, 11, null);
		$this->addForeignKey('MATCH_ID', 'MatchId', 'INTEGER', 'match_schedule', 'ID', false, 11, null);
		$this->addColumn('BATTING_POINT', 'BattingPoint', 'INTEGER', false, 11, null);
		$this->addColumn('BOWLING_POINT', 'BowlingPoint', 'INTEGER', false, 11, null);
		$this->addColumn('NOTOUT_POINT', 'NotoutPoint', 'INTEGER', false, 11, null);
		$this->addColumn('CATCH_POINT', 'CatchPoint', 'INTEGER', false, 11, null);
		$this->addColumn('FIELDING_POINT', 'FieldingPoint', 'INTEGER', false, 11, null);
		$this->addColumn('BATTING_BONUS', 'BattingBonus', 'INTEGER', false, 11, null);
		$this->addColumn('BOWLING_BONUS', 'BowlingBonus', 'INTEGER', false, 11, null);
		$this->addColumn('TOTAL_POINTS', 'TotalPoints', 'INTEGER', false, 11, null);
		$this->addColumn('PRICE_CHANGE', 'PriceChange', 'FLOAT', false, 11, null);
		// validators
	} // initialize()

	/**
	 * Build the RelationMap objects for this table relationships
	 */
	public function buildRelations()
	{
    $this->addRelation('Player', 'Player', RelationMap::MANY_TO_ONE, array('player_id' => 'id', ), null, null);
    $this->addRelation('MatchSchedule', 'MatchSchedule', RelationMap::MANY_TO_ONE, array('match_id' => 'id', ), null, null);
	} // buildRelations()

} // DailyRecordTableMap
